package top_practice_1001;

import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner scanner=new Scanner(System.in);
		String string=scanner.next();
		scanner.close();
		
		List<String> luckies=new ArrayList<>();
		
		for(int i=1;i<=string.length();i++) {
			for(int j=0;j<string.length();j++) {
				if(i+j>string.length()) {
					break;
				}
				String s=string.substring(j, i+j);
				int factor=factor(s);
				if(isFabonacii(factor)&&!luckies.contains(s)) {
					luckies.add(s);
				}
			}
		}
		luckies.sort(new Comparator<String>() {
			@Override
			public int compare(String o1, String o2) {
				
				if(o1.length()>o2.length()) {
					return -compare(o2, o1);
				}
				
				if(o2.startsWith(o1)) {
					return -1;
				}
				
				for(int i=0;i<o1.length();i++) {
					char c1=o1.charAt(i),c2=o2.charAt(i);
					if(c1<c2) {
						return -1;
					}else if(c1>c2) {
						return 1;
					}
				}
				return 0;
			}
		});
		
		for(String s:luckies) {
			System.out.println(s);
		}
	}
	static int factor(String string) {
		int factors=0;
		int[]dic=new int[26] ;
		for(int i=0;i<string.length();i++) {
			dic[string.charAt(i)-'a']=1;
		}
		for(int i=0;i<26;i++) {
			factors+=dic[i];
		}
		return factors;
	}
	
	static boolean isFabonacii(int n) {
		return n==1||n==2||n==3||n==5||n==8||n==13||n==21;
	}
}
